import { createRouter, createWebHistory } from 'vue-router'
import loginVue from '../view/login.vue';
import MainVue from '../view/main.vue'
import register from '../view/register.vue'
import productlist from '../view/productlist.vue'
import userlist from '../view/userlist.vue'
import authoirtylist from '../view/authoirtylist.vue'
const routes = [
    {
        path: '/',
        name: 'login',
        component: loginVue
    },
    {
        path: '/register',
        name: 'register',
        component: register
    },

    {
        path: '/main',
        name: 'main',
        component: MainVue,
        children: [
            {
                path: "",
                component: userlist
            },
            {
                path: "authoirtylist",
                component: authoirtylist
            },
            {
                path: "productlist",
                component: productlist
            }
        ]
    },
];
const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes
})
export default router